﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master/DefaultNonMenu.master" AutoEventWireup="true" CodeBehind="EmptyOrderPendingGen.aspx.cs" Inherits="Runda.EShop.SaaS.OrderManage.EmptyOrderPendingGen" %>

<%@ Register Src="~/UserControl/OrderInfo.ascx" TagPrefix="uc" TagName="OrderInfo" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphHeader" runat="server">
<script type="text/javascript">
    function Check() {
        var flag = false; var id = '';
        $('#<%=gvOrderDetail.ClientID %> input[type="checkbox"]').each(function () {

            if ($(this).attr('checked') != undefined && $(this).attr('checked') == 'checked') {
                flag = true;
                id = $(this).attr('id');
            }
        });

        if (flag) {
            return true;
        }
        else {
            alert('请选择新订单的产品项');
            return false;
        }
    }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphMain" runat="server">
    <div class="i_tablebt_xian" style="margin: 10px 0px 0px 0px; width: 100%;">
        <span class="l"><img src="<%=ResolveUrl("~/images/ico/down_16x16.gif")%>" align="absmiddle" />订单信息</span>
    </div>
    <div class="clear">
    </div>
    <uc:orderinfo runat="server" id="ucOrderInfo" />
    <div class="clear">
    </div>
    <div class="i_tablebt_xian" style="margin: 10px 0px 0px 0px; width: 100%;">
        <span class="l"><img src="<%=ResolveUrl("~/images/ico/down_16x16.gif")%>" align="absmiddle" />订单产品详细信息</span>
    </div>
    <div class="clear"></div> 
     <asp:GridView ID="gvOrderDetail" runat="server" AutoGenerateColumns="False" DataKeyNames="DetailID,ProductID"
        OnRowDataBound="gvOrderDetail_RowDataBound" Width="100%">
        <Columns>
            <asp:TemplateField HeaderText="操作">
                <ItemTemplate>
                    <asp:CheckBox ID="ckbSelect" runat="server" />
                </ItemTemplate>
                <ItemStyle Width="40px" />
            </asp:TemplateField>
            <asp:BoundField DataField="ProductCode" HeaderText="产品编号" ItemStyle-Width="80px" />
            <asp:BoundField DataField="ProductName" HeaderText="产品名称" ItemStyle-Width="270px" /> 
            <asp:BoundField DataField="ProductStd" HeaderText="规格" ItemStyle-Width="150px" /> 
            <asp:BoundField DataField="Unit" HeaderText="计量单位" ItemStyle-Width="50px" />
            <asp:BoundField DataField="Quantity" HeaderText="计量单位" ItemStyle-Width="40px" />
        </Columns>
    </asp:GridView>
     <div class="i_tablebt_xian" style="margin:10px 0px 0px 0px; width:100%;"></div>
     <div class="banner7 r">
            <asp:LinkButton ID="btnSave" runat="server" onclick="btnSave_Click" ClientIDMode="Static" OnClientClick="return Check();">生成新订单</asp:LinkButton>
     </div> 
</asp:Content>
